package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AccountingExpenseCategoriesMapper;
import com.ruoyi.system.domain.AccountingExpenseCategories;
import com.ruoyi.system.service.IAccountingExpenseCategoriesService;

/**
 * 记账本支出类型 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-13
 */
@Service
public class AccountingExpenseCategoriesServiceImpl implements IAccountingExpenseCategoriesService
{
    @Autowired
    private AccountingExpenseCategoriesMapper accountingExpenseCategoriesMapper;

    /**
     * 通过id查询记账本支出类型
     *
     * @param id 记账本支出类型主键
     * @return 记账本支出类型
     */
    @Override
    public AccountingExpenseCategories selectAccountingExpenseCategoriesById(Long id)
    {
        return accountingExpenseCategoriesMapper.selectAccountingExpenseCategoriesById(id);
    }

    /**
     * 查询记账本支出类型列表
     *
     * @param accountingExpenseCategories 记账本支出类型
     * @return 记账本支出类型
     */
    @Override
    public List<AccountingExpenseCategories> selectAccountingExpenseCategoriesList(AccountingExpenseCategories accountingExpenseCategories)
    {
        return accountingExpenseCategoriesMapper.selectAccountingExpenseCategoriesList(accountingExpenseCategories);
    }

    /**
     * 新增记账本支出类型
     *
     * @param accountingExpenseCategories 记账本支出类型
     * @return 结果
     */
    @Override
    public int insertAccountingExpenseCategories(AccountingExpenseCategories accountingExpenseCategories)
    {
        return accountingExpenseCategoriesMapper.insertAccountingExpenseCategories(accountingExpenseCategories);
    }

    /**
     * 修改记账本支出类型
     *
     * @param accountingExpenseCategories 记账本支出类型
     * @return 结果
     */
    @Override
    public int updateAccountingExpenseCategories(AccountingExpenseCategories accountingExpenseCategories)
    {
        return accountingExpenseCategoriesMapper.updateAccountingExpenseCategories(accountingExpenseCategories);
    }

    /**
     * 通过id批量删除记账本支出类型信息
     *
     * @param ids 需要删除的记账本支出类型主键
     * @return 结果
     */
    @Override
    public int deleteAccountingExpenseCategoriesByIds(Long[] ids)
    {
        return accountingExpenseCategoriesMapper.deleteAccountingExpenseCategoriesByIds(ids);
    }

    /**
     * 通过id删除记账本支出类型信息
     *
     * @param id 记账本支出类型主键
     * @return 结果
     */
    @Override
    public int deleteAccountingExpenseCategoriesById(Long id)
    {
        return accountingExpenseCategoriesMapper.deleteAccountingExpenseCategoriesById(id);
    }
}
